const AppKeyDefine = {
  tokenKey: 'access_token',
  refreshTokenKey: 'refresh_token',
};
// 已接样本显示方式
const SampleShowDisplayType = {
  all: 'all',
  user: 'user',
  client: 'client',
};
// 接收级别
const SampleReceiveRange = {
  first: '1',
  second: '2',
  three: '3',
};

const sampleShowDisplayTypeOptions = [
  { label: '单元接收所有样本', value: SampleShowDisplayType.all },
  { label: '当前用户在该单元接收的样本', value: SampleShowDisplayType.user },
  {
    label: '当前客户端在该单元接收的样本',
    value: SampleShowDisplayType.client,
  },
];
const sampleReceiveRangeOptions = [
  { label: '一级', value: SampleReceiveRange.first },
  { label: '二级', value: SampleReceiveRange.second },
  { label: '三级', value: SampleReceiveRange.three },
];

/**项目状态 */
const defaultOptionStatusList = [
  { label: '全部', value: '' },
  { label: '在用', value: '1' },
  { label: '禁用', value: '0' },
];

const optionsSortList = [
  { label: '检测', value: '1' },
  { label: '转送', value: '2' },
  { label: '外送', value: '3' },
];

const optionsItemTypeList = [
  { label: '单项', value: '0' },
  { label: '分类', value: '1' },
  { label: '组合', value: '2' },
];

const optionsSpecimenListCircle = [
  { label: '当日', value: 'D' },
  { label: '星期一', value: 'W1' },
  { label: '星期二', value: 'W2' },
  { label: '星期三', value: 'W3' },
  { label: '星期四', value: 'W4' },
  { label: '星期五', value: 'W5' },
  { label: '星期六', value: 'W6' },
  { label: '星期日', value: 'W7' },
  { label: '当月', value: 'M' },
  { label: '年', value: 'Y' },
  { label: '样本号循环', value: 'R' },
];

const optionsItemStatusList = [
  // {
  //   value: '0',
  //   label: '禁用',
  // },
  {
    value: '11',
    label: '未维护',
  },
  {
    value: '12',
    label: '已维护',
  },
  {
    value: '13',
    label: '已启用',
  },
  {
    value: '14',
    label: '已停用',
  },
  // {
  //   value: '2',
  //   label: '删除',
  // },
];

const optionsSpecimenList = () => {
  const list = [{ label: '当日', value: '0' }];
  const initList = new Array(100).fill(0);
  initList?.map((_, i) => {
    list.push({
      label: `+${i + 1}`,
      value: `${i + 1}`,
    });
  });
  return list;
};

export {
  sampleShowDisplayTypeOptions,
  sampleReceiveRangeOptions,
  AppKeyDefine,
  defaultOptionStatusList,
  optionsSortList,
  optionsSpecimenList,
  optionsSpecimenListCircle,
  optionsItemTypeList,
  optionsItemStatusList,
};
